/*
 * =====================================================================================
 *
 *       Filename:  rw_share_mem.h
 *
 *    Description:  interface of share memory
 *
 *        Version:  1.0
 *        Created:  01/22/15 10:30:45
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  yangkun (yk)
 *          Email:  kun.yang@omnificweb.com
 *        Company:  omnificweb.com
 *
 * =====================================================================================
 */
#ifndef _RW_SHARE_MEM_H_
#define _RW_SHARE_MEM_H_
#define SHARE_MEMORY_KEY 0XFFFFAAAA
enum share_mem_type
{
	E_SM_READ=1,
	E_SM_WRITE,
};
//return 0 : success   <0 error
int init_share_mem(int size);
int write_share_mem(char *buf,unsigned int bufsize);
int read_share_mem(char *buf,unsigned int bufsize);
int detach_share_mem();
#endif //end of _RW_SHARE_MEM_H_ 

